﻿<html dir="LTR" xmlns:ndoc="urn:ndoc-schema">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="history" name="save" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>InputDevice Class</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />
  </head>
  <body id="bodyID" class="dtBODY">
    <div id="nsbanner">
      <div id="bannerrow1">
        <table class="bannerparthead" cellspacing="0">
          <tr id="hdr">
            <td class="runninghead">A MIDI Library for .NET</td>
            <td class="product">
            </td>
          </tr>
        </table>
      </div>
      <div id="TitleRow">
        <h1 class="dtH1">InputDevice Class</h1>
      </div>
    </div>
    <div id="nstext">
      <p> A MIDI input device. </p>
      <p>
								For a list of all members of this type, see <a href="Midi~Midi.InputDevice~Members.html">InputDevice Members
								</a>.
							</p>
      <p>
        <a href="http://msdn.microsoft.com/en-us/library/System.Object(VS.90).aspx">System.Object</a>
        <br />   <a href="Midi~Midi.DeviceBase.html">DeviceBase</a><br />      <b>InputDevice</b></p>
      <div class="syntax">
        <div>public class InputDevice<b> : <a href="Midi~Midi.DeviceBase.html">DeviceBase</a></b></div>
      </div>
      <H4 class="dtH4">Thread Safety</H4>
      <P>This type is safe for multithreaded operations.</P>
      <h4 class="dtH4">Remarks</h4>
      <p>Each instance of this class describes a MIDI input device installed on the system. You cannot create your own instances, but instead must go through the <a href="Midi~Midi.InputDevice.InstalledDevices.html">InstalledDevices</a> property to find which devices are available. You may wish to examine the <a href="Midi~Midi.DeviceBase.Name.html">Name</a> property of each one and present the user with a choice of which device(s) to use.</p>
      <p>Open an input device with <a href="Midi~Midi.InputDevice.Open.html">Open</a> and close it with <a href="Midi~Midi.InputDevice.Close.html">Close</a>. While it is open, you may arrange to start receiving messages with <a href="Midi~Midi.InputDevice.StartReceiving.html">StartReceiving</a> and then stop receiving them with <a href="Midi~Midi.InputDevice.StopReceiving.html">StopReceiving</a>. An input device can only receive messages when it is both open and started.</p>
      <p>Incoming messages are routed to the corresponding events, such as <a href="Midi~Midi.InputDevice.NoteOn.html">NoteOn</a> and <a href="Midi~Midi.InputDevice.ProgramChange.html">ProgramChange</a>. The event handlers are invoked on a background thread which is started in <b>StartReceiving</b> and stopped in <b>StopReceiving</b>. </p>
      <p>As each message is received, it is assigned a timestamp in one of two ways. If <b>StartReceiving</b> is called with a <a href="Midi~Midi.Clock.html">Clock</a>, then each message is assigned a time by querying the clock's <a href="Midi~Midi.Clock.Time.html">Time</a> property. If <b>StartReceiving</b> is called with null, then each message is assigned a time based on the number of seconds since <b>StartReceiving</b> was called.</p>
      <h4 class="dtH4">Requirements</h4>
      <p>
        <b>Namespace: </b>
        <a href="~Midi.html">Midi</a>
      </p>
      <p>
        <b>Assembly: </b>Midi (in Midi.dll)
					</p>
      <h4 class="dtH4">See Also</h4>
      <p>
        <a href="Midi~Midi.InputDevice~Members.html">InputDevice Members</a> | <a href="~Midi.html">Midi Namespace</a> | <a href="Midi~Midi.Clock.html">Clock</a> | <a href="Midi~Midi.InputDevice.html">InputDevice</a></p>
      <hr />
      <div id="footer">
        <p>
          <a>Copyright © 2009 Tom Lokovic</a>
        </p>
        <p>Generated from assembly Midi [1.1.0.0] by <a href="http://ndoc3.sourceforget.net">NDoc3</a></p>
      </div>
    </div>
  </body>
</html>